//
//  FPLuckyDrawAlertView.m
//  FootPad
//
//  Created by 张浩 on 2021/5/28.
//  Copyright © 2021 hb_147. All rights reserved.
//

#import "MM_CodeResultItemView.h"
#import "AppDelegate.h"

@interface MM_CodeResultItemView ()

@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *descLabel;

@end

@implementation MM_CodeResultItemView

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        self.frame = CGRectMake(0, 0, ScreenW, ScreenH);
        
        _nameLabel = [Custom_ZHTool uiLabelCreate:@"账面数量" Font:FONT_BOLD(14) TextColor:[ColorUtil colorWithHexadecimal:@"#000000"]];
        _nameLabel.numberOfLines = 0;
        [self addSubview:_nameLabel];
        
        _descLabel = [Custom_ZHTool uiLabelCreate:@"2" Font:FONT(16) TextColor:[ColorUtil colorWithHexadecimal:@"#000000"]];
        _descLabel.numberOfLines = 0;
        [self addSubview:_descLabel];

        [self setUpViews];
    }
    return self;
}

- (void)setUpViews {
        
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.centerX.equalTo(self);
    }];
       
    [self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(self.nameLabel.mas_bottom).offset(5);
        make.centerX.equalTo(self.nameLabel);
    }];
       
}

- (void)setNameStr:(NSString *)nameStr andDescStr:(NSString *)descStr {
    self.nameLabel.text = nameStr;
    self.descLabel.text = descStr;
}

@end
